#ifndef CASEDB_IMPL_VALUE_CONVERSIONS_HPP
#define CASEDB_IMPL_VALUE_CONVERSIONS_HPP

#include "CaseDB/DbTypes.hpp"
#include <QtCore/QVariant>
#include <boost/any.hpp>

namespace CaseDB { namespace Impl
{

/// @ingroup CaseDB
/// @brief It provides methods for value conversions from boost::any to QVariant, using the provided database type hint.
struct ValueConversions
{
	/// @brief It converts a value from boost::any to QVariant.
	/// @param dbType the database type hint, providing information about which type boost::any value refers to.
	/// @param value the value to be converted.
	static QVariant anyToQVariant( DbTypes dbType, const boost::any& value);

	/// @brief It converts a value from QVariant to boost::any.
	/// @param dbType the database type hint, providing information about which type boost::any value should refer to.
	/// @param value the value to be converted.
	static boost::any QVariantToAny( DbTypes dbType, const QVariant& value);
};

}} // namespace Impl // namespace CaseDB

#endif // CASEDB_IMPL_VALUE_CONVERSIONS_HPP
